<style type="text/css">
.searchborder
{
	border:1px solid #999;
	font-family:Verdana, Geneva, sans-serif;
	font-size:12px;
	padding:5px 5px 5px 5px;
	font-weight:normal;
	color:#000;
}
</style>
<?php 
include("application/base_class.php");
$base_obj = new BaseClass();

$str='';
$q=$_GET["q"];
 
 $qry ="SELECT j.category,js.id id,js.sub_cat_name,js.desc,js.active_status from 
job_subcategory js INNER JOIN job_category j ON j.id=js.category_id
						where j.id='".$q."' order by j.id desc";
$res = mysql_query($qry) or die(mysql_error());


if(mysql_num_rows($res)>0)
	 {
		  $str .='<select name="subcat" class="searchborder" style="width:220px;"><option value="">--Select SubCategory--</option> ';
		 while($data=mysql_fetch_array($res)) 
		{
			
			$str .='<option value="'.$data['id'].'" >'.$data['sub_cat_name'].'</option>';
	    
		}
		$str	.='</select>';
		echo $str;
	}
	else
	{   $str .='<select name="subcat" class="searchborder" style="width:220px;"> <option value="">--Select SubCategory--</option>';
	 	$str	.='<option value="No Data Found"></option>';
		$str	.='</select>';
		echo 	$str;
	}
 
?> 
	
    